﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AltaClientArticlePreu.ascx.cs" Inherits="Vista.Controls.AltaClientArticlePreu" %>

<%@ Register Src="~/Controls/ModalPanel.ascx" TagPrefix="ctrl" TagName="Modal" %>
<br />
<asp:Label runat="server" CssClass="classTitul" Text="Alta Relació Preu per Client" />
<br />
<br />
<div id="divAvisConcepte_OT" runat="server" style="color: Red; margin-top: 10px;
    margin-bottom: 10px;">
    <asp:RangeValidator ID="rvPreu" runat="server" ControlToValidate="txtPreu"
        Type="Double" Text="Format del Preu incorrecte" Display="Dynamic"
        SetFocusOnError="true" MinimumValue="0" MaximumValue="3156" />
</div>
<br />
<label class="classEsquerra" style="width:60px; margin-left:35px;">Client </label>
<asp:DropDownList ID="ddlClient" runat="server" Width="150px" DataSourceID="odsClient"
    DataTextField="NomClient" DataValueField="IdClient" class="classEsquerra"  />
<%--Carrega l'objecte client des de negoci--%>
<asp:ObjectDataSource ID="odsClient" runat="server" DataObjectTypeName="DeltaFlex.Negoci.Client"
    SelectMethod="LlistarClientByIDClient" TypeName="DeltaFlex.Negoci.Client">
    <SelectParameters>
        <asp:QueryStringParameter Name="idClient" QueryStringField="empid" DefaultValue="0" />
    </SelectParameters>
</asp:ObjectDataSource>

<label class="classlabelAlta" style="width:70px; margin-left:35px;">Articles</label>
<asp:DropDownList ID="ddlArticle" runat="server" Width="250px" DataSourceID="odsArticles"
    DataTextField="NomArticle" DataValueField="IdArticle" class="classEsquerra"  />
<%--Carrega l'objecte Articles des de negoci--%>
<asp:ObjectDataSource ID="odsArticles" runat="server" DataObjectTypeName="DeltaFlex.Negoci.Articles"
    SelectMethod="LlistaTotsArticles" TypeName="DeltaFlex.Negoci.Articles" />
<br />
<br />
<label class="classEsquerra" style="clear:both;width:60px; margin-left:200px;" >Preu </label>
<asp:TextBox ID="txtPreu" runat="server" CssClass="classEsquerra"  Width="150px"/>

<br />
<div style="margin-right: 4%">
    <asp:Button ID="btnAltaRelacio" Text="Alta Relació" ToolTip="Afegir una nova relació Preu per Client"
        runat="server" CssClass="classBotonsDreta" OnClick="btnAltaRelacio_Click" />
</div>

<br />
<br />

<%--Crida al control Modal--%>
<ctrl:Modal ID="mpAltaClientArticlePreu" runat="server" />